﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using Eqwww.Code;
using Eqwww.Domain.Models.SystemManage;

namespace Eqwww.Web.Areas.SystemManage.Models.ModuleButton
{
    public class CreateViewModel
    {
        [Required(ErrorMessage ="本项不能为空！")]
        [Display(Name = "编码")]
        public string Code { get; set; }

        [Required(ErrorMessage = "本项不能为空！")]
        [Display(Name = "名称")]
        public string Name { get; set; }


        [Display(Name = "上级按钮")]
        public string ParentId { get; set; }

        [Required(ErrorMessage = "本项不能为空！")]
        [Display(Name = "所属模块")]
        public string ModuleId { get; set; }

        [Required(ErrorMessage = "本项不能为空！")]
        [Display(Name = "按钮位置")]
        public ModuleButtonPosition? ModuleButtonPosition { get; set; }

        [Required(ErrorMessage = "本项不能为空！")]
        [Display(Name = "js脚本")]
        public string JsAction { get; set; }

        [Required(ErrorMessage = "本项不能为空！")]
        [Display(Name = "Url")]
        public string Url { get; set; }

        [Required(ErrorMessage = "本项不能为空！")]
        [Display(Name = "打开方式")]
        public ModuleButtonOpenType? ModuleButtonOpenType { get; set; }

        [Required(ErrorMessage = "本项不能为空！")]
        [Display(Name = "排序码")]
        public int? SortCode { get; set; }

        [Required(ErrorMessage = "本项不能为空！")]
        [Display(Name = "图标")]
        public string Icon { get; set; }

        [Required(ErrorMessage = "本项不能为空！")]
        [Display(Name = "显示方式")]
        public ModuleButtonShowType? ModuleButtonShowType { get; set; }

        [Required(ErrorMessage = "本项不能为空！")]
        [Display(Name = "按钮颜色")]
        public ModuleButtonColorType? ModuleButtonColorType { get; set; }
    }
}
